* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.container {
    padding: 20px;
    max-width: 800px;
    width: 100%;
}

h1 {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.game-wrapper {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
}

.game-area {
    position: relative;
}

#gameCanvas {
    border: 3px solid #fff;
    border-radius: 10px;
    background: #000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.overlay-content {
    text-align: center;
    color: white;
}

.overlay-content h2 {
    font-size: 2em;
    margin-bottom: 20px;
}

.overlay-content p {
    margin-bottom: 20px;
    font-size: 1.2em;
}

.btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s;
}

.btn:hover {
    background: #764ba2;
}

.info-panel {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    min-width: 200px;
}

.info-panel h3 {
    margin-bottom: 10px;
    color: #667eea;
}

.info-panel p {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 20px;
}

.score-section, .level-section, .lines-section, .next-piece {
    margin-bottom: 20px;
}

#nextCanvas {
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #f9f9f9;
}

.controls ul {
    list-style: none;
}

.controls li {
    margin: 5px 0;
    font-size: 0.9em;
    color: #666;
}

@media (max-width: 768px) {
    .game-wrapper {
        flex-direction: column;
        align-items: center;
    }
    
    .info-panel {
        width: 100%;
        max-width: 300px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    #gameCanvas {
        width: 250px;
        height: 500px;
    }
}

@media (max-width: 480px) {
    #gameCanvas {
        width: 200px;
        height: 400px;
    }
    
    .container {
        padding: 10px;
    }
}
